
export function parserOperator(data, key, value, operator) {
  switch (operator) {
    case '=':
      return data[key] === value
    case '!=':
      return data[key] !== value
    case '>':
      return data[key] > value
    case '>=':
      return data[key] >= value
    case '<':
      return data[key] < value
    case '<=':
      return data[key] <= value
    default:
      return false
  }
}

export function parserLogic(source, target, operator) {
  switch (operator) {
    case '&&':
      return source && target
    case '||':
      return source || target
    default:
      return false
  }
}
